  
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Show Room</title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
            <span class="menuButton"><g:link class="list" action="list">Room List</g:link></span>
            <span class="menuButton"><g:link class="create" action="create">New Room</g:link></span>
        </div>
        <div class="body">
            <h1>Room Details</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="dialog">
                <table>
                    <tbody>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Description:</td>
                            
                            <td valign="top" class="value">${room.description}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Location:</td>
                            
                            <td valign="top" class="value"><g:link controller="location" action="show" id="${room?.location?.id}">${room?.location.name}</g:link></td>
                            
                        </tr>
                    
                        <tr class='prop'>
                                <td valign='top' class='name'>
                                    <label for='rates'>Rates:</label>
                                </td>
                                <td valign='top' class='value ${hasErrors(bean:room,field:'rates','errors')}'>

<ul>
<g:each var='r' in='${room?.rates?}'>
    <li><g:link controller='rate' action='show' id='${r.id}'>${r}</g:link></li>
</g:each>
</ul>
<g:link controller='rate' params='["room.id":room?.id]' action='create'>Add Rate</g:link>

                                </td>
                            </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Template Page:</td>
                            
                            <td valign="top" class="value">${room.templatePage}</td>
                            
                        </tr>
                    
                    </tbody>
                </table>
            </div>
            <div class="buttons">
                <g:form controller="room">
                    <input type="hidden" name="id" value="${room?.id}" />
                    <span class="button"><g:actionSubmit class="edit" value="Edit" /></span>
                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
                </g:form>
            </div>
        </div>
    </body>
</html>
